<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../CSS/清楚浏览器默认样式.css">
    <style type="text/css">
    .nav
    {
        /*设置宽度和高度*/
        width: 1210px;
        height: 48px;
        /*设置背景颜色*/
        background-color: lightseagreen;
        margin: 100px auto;/*前面的值是上下，后面的值是左右*/
    }
    .nav li
    {
        /*设置li向左移动，使菜单横向排列*/
        float:left;
        /*设置li的高度*/
        /*height: 48px;*/
        /*将文字在父元素中垂直居中*/
        line-height: 48px;
        /*background-color: lavender;*/
    }
    .nav a
    {
        /*将a转换为块元素*/
        display: block;
        /*去掉下划线*/
        text-decoration: none;
        /*设置字体颜色*/
        color: #777;
        /*调整字体大小*/
        font-size: 20px;

        padding: 0 34.5px;
    }
    /*设置鼠标移入的效果*/
    .nav a:hover
    {
        background-color: #3F3F3F;
        color: #e8e7e3;
    }
    </style>
</head>
<body>
    <ul class="nav">
        <li>
            <a href="a">HTML/CSS</a>
        </li>
        <li>
            <a href="a">Browser Side</a>
        </li>
        <li>
            <a href="a">Server Side</a>
        </li>
        <li>
            <a href="a">Programming</a>
        </li>
        <li>
            <a href="a">XML</a>
        </li>
        <li>
            <a href="a">Web Building</a>
        </li>
        <li>
            <a href="a">Referrnce</a>
        </li>
    </ul>
</body>
</html>